﻿using System;
using System.Collections.Generic;

using System.Text;
using System.IO;

namespace ShapeMergeFactory
{
   internal class ShapeBinaryReader:BinaryReader
    {
        private int BinaryFormat;

        public ShapeBinaryReader(Stream streamType)
            :base(streamType)
        {
            BinaryFormat = 4;
        }

        public int BinaryReadBigEndian()
        {
            byte[] tempBytes = this.ReadBytes(BinaryFormat);
            Array.Reverse(tempBytes);
            return BitConverter.ToInt32(tempBytes,0);
        }
    }
}
